﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <link href="weiKeyBoard.css" rel="stylesheet" />
    <script type="application/javascript" src="weiKeyBoard1.0.js"></script>
    <script type="text/javascript">
        (function () {
            $(function () {
                var keyBoard =new  weiKeyBoard($("#inPwd"),false,false,6);
                $("#inPwd").click(function () {
                    keyBoard.createKeyBoard();//创建键盘
                    $("input").attr("disabled","disabled")
                });
                ////声明此事件后，将不会为控件赋值
                //keyBoard.onKeyPress = function (realVal,randomValue) {
                //    console.log("真实值："+realVal+",随机假值"+randomValue);//注意：此处不能为alert()。否则按钮点击后将不会恢复原来颜色。
                //}
            });
            
        })();
    </script>
</head>
<body>
    <div style="margin-bottom:10px;">
        <table>
            <tr>
                <td>密码:</td>
                <td><input id="inPwd" name="inPwd" type="text"  imemode="disable" readonly="readonly" /></td>
                <td><input type="button" id="getRealValue" value="获取真值" /> </td>
            </tr>
        </table>
    </div>


</body>
</html>
